package cn.home.resident.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import cn.home.contract.domain.HomeContractInfo;
import cn.home.resident.domain.HomeUser;
import cn.home.service.domain.HomeService;
import cn.home.service.domain.HomeServiceRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 居民Mapper接口
 * 
 * @author homedoctor
 * @date 2025-04-09
 */
@Mapper
public interface HomeUserMapper
{
    /**
     * 查询居民
     * 
     * @param id 居民主键
     * @return 居民
     */
    public HomeUser selectHomeUserById(Long id);

    /**
     * 查询居民列表
     * 
     * @param homeUser 居民
     * @return 居民集合
     */
    public List<HomeUser> selectHomeUserList(HomeUser homeUser);

    /**
     * 新增居民
     * 
     * @param homeUser 居民
     * @return 结果
     */
    public int insertHomeUser(HomeUser homeUser);

    /**
     * 修改居民
     * 
     * @param homeUser 居民
     * @return 结果
     */
    public int updateHomeUser(HomeUser homeUser);

    /**
     * 删除居民
     * 
     * @param id 居民主键
     * @return 结果
     */
    public int deleteHomeUserById(Long id);

    /**
     * 批量删除居民
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteHomeUserByIds(Long[] ids);
    public List< HomeUser> selectAllfirstpage( );
   public HomeUser selectHomeUserByIddetail(Integer id);
   public HomeContractInfo selectHomeContractInfoByIddetail(Integer id);
     public List<HomeContractInfo> selecthomecontractinfobyid(Integer id);
     public  List<HomeServiceRecord> selectHomeServicebyid(Integer id);
     public  HomeUser selecthomeuserbysysuserid(Integer id);

     List<Map<String,Object>> selectServicePackagebytime(@Param("start") Date start,@Param("end") Date end);
    List<Map<String,Object>> selectserviceitembytime(@Param("start") Date start,@Param("end") Date end);
    List<Map<Object,Object>> selectresidentage();
    List<Map<Object,Object>> selectresidentculture();
    List<Map<Object,Object>> selectresidentsex();
    List<Map<Object,Object>> selectresidenttag();
    List<Map<Object,Object>> selectservicepackageuse();
}
